home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2006 July & August
/
PCWorld_2006-07-08_cd.bin
/
v cisle
/
acehtml
/
acehtmlfreeware.exe
/
scriptdef
/
Non-Numeric Character Validator.sd
< prev
next >
Wrap
INI File
|
2004-06-28
|
1KB
|
71 lines
[SUBJECT]
Description=Validate character entry
ImageIndex=-1
Folder=Tools
[HEAD_TEXT]
;
;<!-- Cut-N-Paste JavaScript from ISN Toolbox
;
;Copyright 1996, Infohiway Server Network. Restricted use is hereby
;
;granted (both personal and commercial use OK so long as this code is
;
;not *directly* sold), providing this notice is buried somewhere deep
;
;in your HTML document. A link to http://www.infohiway.com is always
;
;appreciated, but is absolutely and positively not necessary. :-) -->
;
;<script language="JavaScript">
; var nr=0;
; function numericCheck(){
; nr1=document.isn.nr.value;
; flg=0;
; str="";
; spc="";
; arw="";
; for (var i=0;i<nr1.length;i++){
; cmp="0123456789";
; tst=nr1.substring(i,i+1);
; if (cmp.indexOf(tst)<0){
; flg++;
; str+=" "+tst;
; spc+=tst;
; arw+="^";
; }
; else{arw+="_";}
; }
; if (flg!=0){
; if (spc.indexOf(" ")>-1) {
; str+=" and a space";
; }
; alert(nr1+"\r"+arw+"\rI'm sorry. This entry must "
; +"be a number. I found "+flg+" unacceptable: "+str+".");
; return false;
; }
; return true;
; }
;// End Hiding -->
;</script>
[BODY_TEXT]
;<form name="isn" onSubmit="return numericCheck()">
;
;`Caption`<br>
;<input type="text" name="nr" size="40" value="" onBlur="numericCheck()"><br><br>
;
;<input type="submit" name="html1" value=" Submit ">
;
;</form>
[`Caption`]
Kind=S
Value=Non-Number checker: